/**
 * Created by UI on 2017/11/29.
 */
function show(){
    var box = document.getElementById("detail_box3");
    var text = box.innerHTML;
    var newBox = document.createElement("div");
    var btn = document.createElement("a");

    newBox.innerHTML = text.substring(0,400);
    btn.innerHTML = text.length > 400 ? "查看更多" : "";
    btn.href = "###";

    btn.onclick = function(){
        if (btn.innerHTML == "查看更多"){
            btn.innerHTML = "点击收起";
            newBox.innerHTML = text;
        }else{
            btn.innerHTML = "查看更多";
            newBox.innerHTML = text.substring(0,400);
        }
    }
    box.innerHTML = "";
    box.appendChild(newBox);
    box.appendChild(btn);

}
show();